﻿#region Using declarations
using System;
using System.ComponentModel;
using System.Drawing;
using System.Globalization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Indicator;
using NinjaTrader.Strategy;
#endregion

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
    partial class Strategy
    {
        ///This reserved word returns a numeric expression representing the EasyLanguage date
        ///(YYYMMDD) equivalent to the standard date specified (YYYY, MM, DD).
        ///Syntax:
        ///ELDate(YYYY, MM, DD)
        ///Parameters:
        ///YYYY is the 4-digit numeric expression representing the year, MM is the 2-digit
        ///expression representing the month, and DD is the 2-digit numeric expression
        ///representing the day of the month.
        public int ELDate(int YYYY, int MM, int DD)
        {

            int result = 1000000 + (YYYY - (int)Floor(YYYY / 100) * 100) * 10000;
            result += MM * 100;
            result += DD;
            return result;
        }

    }
}
